package com.goodmr.passport.device;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 设备类型
 *
 * @author <a href="mailto:bingdong13@msn.com">bigo</a>
 */
@Getter
@AllArgsConstructor
public enum DeviceTypeEnum {

    WEB("Web", "Web"),
    WEBAPP("Webapp", "Webapp"),
    ANDROID("Android", "Android"),
    IOS("iOS", "iOS");

    private String value;

    private String desc;

    public static DeviceTypeEnum get(String value) {

        for (DeviceTypeEnum enumValue : DeviceTypeEnum.values()) {
            if (enumValue.getValue().equals(value)) {
                return enumValue;
            }
        }

        return null;
    }
}
